package com.asm.controller.api;

import com.asm.controller.BaseController;
import com.asm.dto.Result;
import com.asm.service.SpotService;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @program: AdvertisementManagementSystem
 * @description: 主页业务逻辑接口设计
 * @author: CrysTzj
 * @create: 2019-07-11 00:03
 **/
@RestController
public class HomeController extends BaseController {
    @Resource
    private SpotService spotService;

    /**
     * 功能描述 返回网页首页需要的数据
     *
     * @return org.springframework.http.ResponseEntity<com.asm.dto.Result>
     * @author Tanzujie
     * @date 2019-07-11
     */
    @ApiOperation("接口描述:返回网页首页需要的数据")
    @GetMapping("/home")
    public ResponseEntity<Result> getHomeInfo() {
        return new ResponseEntity(new Result().ok("success", spotService.getHomeInfo()), HttpStatus.OK);
    }

}
